<!DOCTYPE html>
<html>
<?php echo $this->fetch('head.html'); ?>
<body>
<div class="fullscreen">
  <div class="scroll_content">
    <div class="topfixed">
      <div class="t_left"><a href="/index.php?m=tejia"><i class="back"></i></a></div>
      <div class="t_main">特价抢购</div>
    </div>
    <div class="paddingheight"></div>
    <form method="post" action="/index.php?m=tejia_order&a=buysave">
<input type="hidden" name="id" value="<?php echo $this->_var['data']['id']; ?>">
<input type="hidden" name="back_url" value="<?php echo $this->_var['back_url']; ?>" />
    <div class="comblock">
      <div class="address_info">
      <?php $_from = $this->_var['address']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?>
 
    
        <p class="info">
        <a href="/index.php?m=user_address&a=add&id=<?php echo $this->_var['c']['id']; ?>">
        <input type="hidden" name="user_address_id"  value="<?php echo $this->_var['c']['id']; ?>">  <span class="name"><?php echo $this->_var['c']['truename']; ?></span> <span class="tel"><?php echo $this->_var['c']['telephone']; ?></span><br>
         <?php echo $this->_var['dist_list'][$this->_var['c']['province_id']]; ?> <?php echo $this->_var['dist_list'][$this->_var['c']['city_id']]; ?> <?php echo $this->_var['dist_list'][$this->_var['c']['town_id']]; ?> <?php echo $this->_var['c']['address']; ?> <?php echo $this->_var['c']['sushe']; ?>  
         </a>
         </p>
         <?php endforeach; else: ?>
         <p class="info">
         	 <a href="/index.php?m=user_address&a=add">
             添加收货地址
             </a>
         </p>
         <?php endif; unset($_from); ?><?php $this->pop_vars();; ?> 
      </div>
    </div>
    
    <div class="comblock">
  <ul class="cart_new_list clearfix">
  <li>
  	<div class="list clearfix">
                <div class="cart_pic">
                    <a href=""><img src="<?php echo images_site($this->_var['data']['imgurl']); ?>.100x100.jpg" class="img"></a>
                </div>
                <div class="cart_content">
                    <div class="tit"><?php echo $this->_var['data']['title']; ?></div>
                    <div class="info">
                        <p class="fl">
                            <span class="num">￥<?php echo $this->_var['data']['price']; ?></span>
                            
                        </p>

                        <p class="fr">
                            <input type="number"  name="amount" value="1" style="border-radius:5px; width:50px; height:25px; text-align:center; line-height:25px; border:1px solid #ccc;">
                           
                             
                            
                        </p>
                    </div>
                    <div style="font-size:0.8em; line-height:1.3em; color:#666;">限买<?php echo $this->_var['data']['limit_num']; ?>份</div>

                </div>
            </div>
  </li>
 </ul> 

 
</div>
    <div class="comblock">
	<input type="hidden" name="pay_type" value="wxpay" id="paytype">
    <dl class="cart_change_dl special clearfix">
            <dt>选择付款方式：</dt>
            <?php $_from = $this->_var['pay_type_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'p');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['p']):
?>
            <dd tid="paytype"   v="<?php echo $this->_var['k']; ?>">
                <span class="select"></span><?php echo $this->_var['p']; ?>
            </dd>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            
             

        </dl>
  
  
</div>
   
   <div class="comblock">

  <div class="cart_change_notice">
    <textarea class="area"  name="comment" placeholder="可填写您对口味以及配送时间的要求等"></textarea>
  </div>
</div> 
    
    <button type="submit" class="cart_change_btn">确认抢购</button>
   
  </div>
</div>

 
  <?php echo $this->fetch('footer.html'); ?> </div>
  
 <script>

$(document).on("click",".cart_change_dl dd",function(e) {
	
	 
		$("#paytype").val($(this).attr("v"));
    $(this).addClass("cur").siblings().removeClass("cur");
});
</script> 
</body>
</html>